﻿function Process-Item( [System.IO.FileInfo[]] $file )
{
    if ($file -ne $null){
    Out-Host $file.Name
    }
}
   


$dir=Split-Path -Parent $PSCommandPath 
Out-Host -InputObject $dir
gci $dir  | Process-Item